let mongodb = require("../server/config");

/*
* 账号数据模型
* */

let Schema = mongodb.mongoose.Schema;

let userSchema = new Schema({
  userName: {type: String},  // 用户名
  passWord: {type: String},  // 密码
  createTime: {type: Date, default: Date.new},  // 创建时间
  roles: {type: String, default: 'member'},  // 'member',  // 会员  'root',  // 最高权限
});

let userModel = mongodb.mongoose.model("users", userSchema);

exports.userList = userModel;
